<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
     <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="../resource/css/base.css">
		<script type="text/javascript" src="../resource/js/ExcelExporter.js"></script>
		<s:actionmessage />
		<script type="text/javascript">
		function doFun(method){
			if(method == 'cls'){
				parent.ClosePop();
			}else if(method == "exp"){
				var data = {
					table : "chargeHistory",
					title : document.getElementById('clientName').value + '运费明细表',
					head : 2
				};
				var excelExporter = new ExcelExporter();
				excelExporter.init();
				excelExporter.getDate(data);
				excelExporter.toExcel();
			}else{
				window.print();;
			}
		}
		</script>
	</head>
	<body  oncontextmenu="return false;" leftmargin="3" topmargin="8" style="overflow: auto;">
		<input type="hidden" name="clientName" value="${clientInfo.clientName}"/>
		<table id="oweFeeDetail" class="edittb" cellpadding="2" cellspacing="1" style="overflow: auto;">
			<tr bgcolor="#EEF4EA">
				<td class="coln">客户名称</td>
				<td class="colv">${clientInfo.clientName}</td>
				<td class="coln">联系人</td>
				<td class="colv">${clientInfo.linkman}</td>
				<td class="coln">联系电话</td>
				<td class="colv">${clientInfo.phone}</td>
			</tr>
		</table>
		<!--  搜索表单  -->
		<table id="chargeHistory" width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top: 8px">
			<tr align="center" bgcolor="#FAFAF1" height="22">
				<td width="8%">序号</td>
				<td width="12%">订单号</td>
				<td width="10%">订单运费</td>
				<td width="10%">应付运费</td>
				<td width="10%">实付运费</td>
				<td width="15%">付费日期</td>
				<td width="10%">拖欠费用</td>
				<td width="25%">备注</td>
			</tr>
			<tbody style="overflow: auto;">
				<s:iterator value="list" status="st" id="vo">
					<s:if test="#request.list.size() > #st.count">
						<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
							<td><s:property value="#st.count"/></td>
							<td><s:property value="orderId"/></td>
							<td><s:text name="format.number"><s:param value="totalfee"/></s:text></td>
							<td><s:text name="format.number"><s:param value="oweFee"/></s:text></td>
							<td><s:text name="format.number"><s:param value="realPayFee"/></s:text></td>
							<td>
								<s:if test="#vo.chargeDate!=null">
									<s:date name="chargeDate" format="yyyy-MM-dd"/>
								</s:if>
								<s:else>-</s:else>
							</td>
							<td><s:text name="format.number"><s:param value="curretOwe"/></s:text></td>
							<td><s:property value="note"/></td>
						</tr>
					</s:if>
				</s:iterator>
			</tbody>
			<tfoot>
				<tr align="center" bgcolor="#FAFAF1" height="22">
					<td>合计</td>
					<td>共&nbsp;<span style="color:red;"><s:property value="list[list.size()-1].countOrders"/></span>&nbsp;笔</td>
					<td colspan="2">
						总运费&nbsp;<span style="color:red;"><s:text name="format.number"><s:param value="list[list.size()-1].totalFee"/></s:text></span>&nbsp;元
					</td>
					<td colspan="2">
						已付费&nbsp;<span style="color:red;"><s:property value="list[list.size()-1].countCharges"/></span>&nbsp;次
					</td>
					<td colspan="2">
						已付费&nbsp;<span style="color:red;"><s:text name="format.number"><s:param value="list[list.size()-1].resumeCharge"/></s:text></span>&nbsp;元
					</td>
				</tr>
			</tfoot>
		</table>
		<div style="margin-top:15px; margin-left:15px;">
			<a href="javascript:doFun('prt');" class="coolbg">打印</a>
			<a href="javascript:doFun('exp');" class="coolbg">导出Excel</a>
			<a href="javascript:doFun('cls');" class="coolbg">取消</a>
		</div>
	</body>
</html>